package main

import "fmt"

func twoSum(nums []int, target int)  []int {
	var r []int
	for i := 0; i < len(nums); i++ {
		another := target - nums[i]
		for j := i+1; j < len(nums); j++ {
			if another == nums[j] && i!=j{
				r = append(r, i)
				r = append(r, j)
				fmt.Println(i,j)
				//return r
			}
		}
	}
	return nil
}

func main() {
	var ints []int
	ints = append(ints, 2,7,11,15)
	fmt.Println(twoSum(ints,9))
	//twoSum(ints,9)
}
